package main

import "fmt"

func main() {
	//练习golang语言各个类型直接相互转换
	var a int = 10
	var b float32 = float32(a)
	var c float64 = float64(a)
	var d int = int(b)
	fmt.Printf("a=%v b=%v c=%v d=%v\n", a, b, c, d)

	var n1 int32 = 12
	var n2 int64
	var n3 int8
	n2 = int64(n1) //int32-->int64
	n3 = int8(n1)  //int32-->int8
	fmt.Printf("n1=%v n2=%v n3=%v\n", n1, n2, n3)
}
